<?php echo $this->load->view('meta');?>
<link rel="stylesheet" href="<?=base_url();?>css/static.css" />
<link rel="stylesheet" href="<?=base_url();?>css/calendar.css" />
<title>xa-ncsu | about us - who we are</title>
<?php echo $this->load->view('header'); ?>
</div>
<h2>calendar</h2>
<div id="full_calendar">
<div id="replaceme">
<div id="replace_event"></div>
<table class ="weekly">
	<tr>
		<?
		
		foreach($dayOrder as $w){
			echo "<th>$w</th>";
		}
		?>
	</tr>
	<tr>
	<?php
	foreach ($week as $date) { 
		
			echo "<td><div class='containerr'><div class='date'>" . substr($date,7,2) . "</div>";
			if(isset($events)){
			if(array_key_exists($date,$events)){
				foreach($events[$date] as $current){
					echo "<div class='event'>" . date("g:ia",mktime(substr($current['start'],11,2),substr($current['start'],14,2),substr($current['start'],17,2),0,0,0)) . " " .  $current['name'] . "</div><br>";
				}
				echo "</div></td>";
				
			}
			else{
				echo"</div></td>";
			}
		}
		else{
			echo "</div></td>";
		}
			
			
	}
	?>
	</tr>
</table>
</div>
</div>
<?=$this->load->view('footer');?>	